using System.Collections.Generic;
using Gameplay.PVE.Data;
using UnityEngine;
namespace Gameplay.PVE.Config
{
    public class PveSummonAttributeFunction
    {
        public static float If(bool condition,float a,float b)
        {
            return condition ? a : b;
        }
        
        public static float GetAttr1(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*2*0.3f*1/2*2*(50+skillLevel*5)/100*1*3/2*parent.TotalHp;

                case 2: 
                    return 1f*3*0.6f*1/3*1/2*(1+4)*(50+skillLevel*5)/100*1/2*1/3*parent.TotalHp;

                case 3: 
                    return 1f*3*0.6f*1/3*1/2*(1+4)*(50+skillLevel*5)/100*1/2*1/3*parent.TotalHp;

                case 100: 
                    return 1f*3*4/6*(50+skillLevel*5)/100*0.5f*0.8f*0.5f*parent.TotalHp;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr2(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*2*0.3f*1/2*2*(50+skillLevel*5)/100*1*3/2*parent.AttackValue;

                case 2: 
                    return 1f*3*0.6f*1/3*1/2*(1+4)*(50+skillLevel*5)/100*1*1/3*parent.AttackValue;

                case 3: 
                    return 1f*3*0.6f*1/3*1/2*(1+4)*(50+skillLevel*5)/100*1*1/3*parent.AttackValue;

                case 100: 
                    return 1f*parent.AttackValue;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr3(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*2*0.3f*1/2*2*(50+skillLevel*5)/100*1*3/2*parent.DefenceValue;

                case 2: 
                    return 1f*3*0.6f*1/3*1/2*(1+4)*(50+skillLevel*5)/100*1*1/3*parent.DefenceValue;

                case 3: 
                    return 1f*3*0.6f*1/3*1/2*(1+4)*(50+skillLevel*5)/100*1/2*1/3*parent.DefenceValue;

                case 100: 
                    return 1f*parent.DefenceValue;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr4(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*0;

                case 2: 
                    return 1f*0;

                case 3: 
                    return 1f*0;

                case 100: 
                    return 1f*0;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr5(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*0;

                case 2: 
                    return 1f*0;

                case 3: 
                    return 1f*0;

                case 100: 
                    return 1f*0;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr6(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*0;

                case 2: 
                    return 1f*0;

                case 3: 
                    return 1f*0;

                case 100: 
                    return 1f*0;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr7(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*0;

                case 2: 
                    return 1f*0;

                case 3: 
                    return 1f*0;

                case 100: 
                    return 1f*0;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr8(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*0;

                case 2: 
                    return 1f*0;

                case 3: 
                    return 1f*0;

                case 100: 
                    return 1f*0;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr9(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*0;

                case 2: 
                    return 1f*0;

                case 3: 
                    return 1f*0;

                case 100: 
                    return 1f*0;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr10(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*0;

                case 2: 
                    return 1f*0;

                case 3: 
                    return 1f*0;

                case 100: 
                    return 1f*0;

                default:
                    return 0;
            }
        }
    
    
        public static float GetAttr11(int id,UnitData unit,UnitData parent,int skillLevel)
        {
            switch (id)
            {
                case 1: 
                    return 1f*0;

                case 2: 
                    return 1f*0;

                case 3: 
                    return 1f*0;

                case 100: 
                    return 1f*0;

                default:
                    return 0;
            }
        }
    
    
    }
}   
    